package com.rules.admin.unit.expect;

public class ExpectMatcherResult {
   private ExpectType type;
   private String message;
   private Boolean match;

   public static ExpectMatcherResult ofAssert() {
      ExpectMatcherResult result = new ExpectMatcherResult();
      result.setType(ExpectType.Assert);
      return result;
   }

   public static ExpectMatcherResult ofActionExpect() {
      ExpectMatcherResult result = new ExpectMatcherResult();
      result.setType(ExpectType.ActionExpect);
      return result;
   }

   public static ExpectMatcherResult ofResultExpect() {
      ExpectMatcherResult result = new ExpectMatcherResult();
      result.setType(ExpectType.ResultExpect);
      return result;
   }

   public ExpectType getType() {
      return this.type;
   }

   public void setType(ExpectType type) {
      this.type = type;
   }

   public String getMessage() {
      return this.message;
   }

   public void setMessage(String message) {
      this.message = message;
   }

   public Boolean getMatch() {
      return this.match;
   }

   public void setMatch(Boolean match) {
      this.match = match;
   }

   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof ExpectMatcherResult)) {
         return false;
      } else {
         ExpectMatcherResult other = (ExpectMatcherResult)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            label47: {
               Object this$match = this.getMatch();
               Object other$match = other.getMatch();
               if (this$match == null) {
                  if (other$match == null) {
                     break label47;
                  }
               } else if (this$match.equals(other$match)) {
                  break label47;
               }

               return false;
            }

            Object this$type = this.getType();
            Object other$type = other.getType();
            if (this$type == null) {
               if (other$type != null) {
                  return false;
               }
            } else if (!this$type.equals(other$type)) {
               return false;
            }

            Object this$message = this.getMessage();
            Object other$message = other.getMessage();
            if (this$message == null) {
               if (other$message != null) {
                  return false;
               }
            } else if (!this$message.equals(other$message)) {
               return false;
            }

            return true;
         }
      }
   }

   protected boolean canEqual(Object other) {
      return other instanceof ExpectMatcherResult;
   }

   public int hashCode() {

      int result = 1;
      Object $match = this.getMatch();
      result = result * 59 + ($match == null ? 43 : $match.hashCode());
      Object $type = this.getType();
      result = result * 59 + ($type == null ? 43 : $type.hashCode());
      Object $message = this.getMessage();
      result = result * 59 + ($message == null ? 43 : $message.hashCode());
      return result;
   }

   public String toString() {
      return "ExpectMatcherResult(type=" + this.getType() + ", message=" + this.getMessage() + ", match=" + this.getMatch() + ")";
   }
}
